﻿using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MoeRabbit
{
    class cat_select_nodes
    {/// <summary>
     /// 选择并返回HtmlNodeCollection的通用类
     /// </summary>
     /// <param name="htmldoc"></param>
     /// <param name="SelectNode"></param>
     /// <returns></returns>
        public HtmlNodeCollection Regex(String htmldoc, String SelectNode)
        {
            var htmlDoc = new HtmlAgilityPack.HtmlDocument();
            htmlDoc.LoadHtml(htmldoc);
            var htmlBody = htmlDoc.DocumentNode.SelectNodes(SelectNode);
            return htmlBody;
        }
    }
}
